<template>
	<view class="permission">
		<div style="display: flex;justify-content: center;">
			<div class="title">我们将遵守适用法律规定的要求对您的信息予以充分保护 </div>
		</div>
		<up-cell-group class="cellEdit" closeOnClickAction>
			<up-cell required title="电话权限" :value="value" isLink @tap="open">
			</up-cell>
			<up-cell required title="存储空间" :value="value1" isLink @tap=open1></up-cell>
		</up-cell-group>
		<up-action-sheet :actions="list" @select="selectClick" @close="show=false" :closeOnClickAction="true" :closeOnClickOverlay="true"
			:show="show"></up-action-sheet>

		<up-action-sheet :actions="list" @select="selectClick1" @close="show1=false" :closeOnClickAction="true" :closeOnClickOverlay="true"
			:show="show1"></up-action-sheet>

	</view>
</template>

<script setup>
import { ref } from 'vue';
const title = ref('标题');
const list = ref([
	{ name: '开启' },
	{ name: '关闭' }
]);
const show = ref(false);
const show1 = ref(false);
const value = ref('开启')
const value1 = ref('开启')
const open = () => {
	show.value = true
}
const open1 = () => {
	show1.value = true
}
// 方法  
const selectClick = (index) => {


	if (index.name == '开启') {
		value.value = '开启'
	} else {
		value.value = '关闭'

	}
	show.value = false;
};
const selectClick1 = (index) => {
	console.log(index);
	if (index.name == '开启') {
		value1.value = '开启'

	} else {
		value1.value = '关闭'

	}
	show1.value = false;
};  
</script>

<style lang="scss">
.permission {
	width: 100%;
	height: 100vh;
	background-color: rgba(247, 248, 250, 1);
}

.title {
	width: 650rpx;
	height: 36rpx;
	line-height: 36rpx;
	color: #6C6C6C;
	font-size: 26rpx;
	text-align: left;
	font-family: PingFangSC-regular;
}

.cellEdit {
	margin-top: 18rpx;
	background-color: #fff;
}

.text1 {
	position: absolute;
}
</style>
